<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" />
    <link rel="stylesheet" href="css/style.css" />
    <style>
    	.user-nav ul li:after{left: 0;}
    </style>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">个人中心</h1>
	</header>
	<div class="mui-content">
		<div class="user-head mui-text-center">
			<div style="width: 80px; height: 80px; border-radius: 50%; margin: 0 auto; overflow: hidden;"><img src="images/defaultimg.jpg" id="touxiang" /></div>
			<h4 id="mobile">手机号</h4>
			<h4>登录积分:<span id="integrals">0</span></h4>
			<i class="iconfont icon-shezhi" onclick="window.location.href='user-set.html'"></i>
		</div>
		<div class="user-nav"> 
			<ul class="mui-table-view">
				<li class="mui-table-view-cell"><a data-href="user-name.html" class="mui-navigate-right">
					<img src="images/icon10.png" />修改昵称
				</a></li>
				<li class="mui-table-view-cell"><a data-href="user-integral.html" class="mui-navigate-right">
					<img src="images/icon2.png" />我的积分
				</a></li>
				<li class="mui-table-view-cell"><a data-href="user-exchange.html" class="mui-navigate-right">
					<img src="images/icon3.png" />兑换记录
				</a></li>
				<li class="mui-table-view-cell"><a data-href="user-record.html" class="mui-navigate-right">
					<img src="images/icon12.png" />报名记录
					<!--<span class="mui-pull-right message">0</span>-->
				</a></li>
				<li class="mui-table-view-cell"><a data-href="advice.html" class="mui-navigate-right">
					<img src="images/icon5.png" />用户投诉
				</a></li>
				<li class="mui-table-view-cell"><a data-href="contact.html" class="mui-navigate-right">
					<img src="images/icon6.png" />联系管理员
				</a></li>
			</ul>
		</div>
	</div>
	<!--底部导航-->
	<footer class="mui-row">
		<div class="mui-col-xs-3"><a data-href="index.html">
			<img src="images/f1.png" class="old" />
			<img src="images/f1_on.png" class="hover" />
			<p>首页</p>
		</a></div>
		<div class="mui-col-xs-3"><a data-href="shop.html">
			<img src="images/f2.png" class="old" />
			<img src="images/f2_on.png" class="hover" />
			<p>商城</p> 
		</a></div>
		<div class="mui-col-xs-3"><a data-href="experience.html">
			<img src="images/f3.png" class="old" />
			<img src="images/f3_on.png" class="hover" />
			<p>弓略</p>
		</a></div>
		<div class="mui-col-xs-3"><a data-href="chat.html">
			<img src="images/f3.png" class="old" />
			<img src="images/f3_on.png" class="hover" />
			<p>在线聊天</p>
		</a></div>
		<div class="mui-col-xs-3 on"><a data-href="user.html">
			<img src="images/f4.png" class="old" />
			<img src="images/f4_on.png" class="hover" />
			<p>个人中心</p>
		</a></div>
	</footer>
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" charset="utf-8">
      	mui.init();
      	mui.ajax(H_SRC+'/amier/user/index',{
			data:{
				token:token
			},
			dataType:'json',//服务器返回json格式数据
			type:'post',//HTTP请求类型
			timeout:10000,//超时时间设置为10秒；
			success:function(data){ 
				var dataurl=data.data;
				if(data.code == 401)
				{
					mui.openWindow({
						url:'login.html',
						id:'login.html'
					})
				}else if(data.code == 1)  
				{
					$("#mobile").html(dataurl.nickname);
					$("#integrals").html(dataurl.integrals);
					if(dataurl.touxiang==""){
						
					}else{
						$("#touxiang").attr("src",H_SRC+''+dataurl.touxiang);
					} 
				}else{ 
					mui.toast(data.msg);
				}
			},
			error:function(xhr,type,errorThrown){
				alert(errorThrown) 
			}
		}) 
		$(".user-nav").on("tap","a",function(){ 
      		var href=$(this).attr("data-href");
      		mui.openWindow({
				url:href,
				id:href,
				createNew:true,
				show: {
					autoShow: true,
					aniShow: 'slide-in-right',
					duration: 200
				}
			});
      	})
      	
    </script>
</body>
</html>